package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.CopyrightAuctionConfig;
import com.sc.nft.mapper.CopyrightAuctionConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * @Author：LiGen
 * @Package：com.sc.nft.dao
 * @Project：sc_metago
 * @name：CopyrightAuctionDao
 * @Date：2024/9/12 17:39
 * @Filename：CopyrightAuctionDao
 */
@Slf4j
@Repository
public class CopyrightAuctionConfigDao extends ServiceImpl<CopyrightAuctionConfigMapper, CopyrightAuctionConfig> {
    public CopyrightAuctionConfig getNewOne() {
        LambdaQueryWrapper<CopyrightAuctionConfig> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.last("ORDER BY id DESC LIMIT 1");
        return getOne(queryWrapper);
    }
}
